<!-- 文章头部 -->
<!DOCTYPE html>
<html lang="zh-cmn-Hans" prefix="og: http://ogp.me/ns#" class="han-init">
  <head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <!-- SEO 自动生成插件 -->
    {% seo %}

    <!-- 页面标题 -->
    <!-- <title>{% if page.title %}{{ page.title }} &mdash; {% endif %}{{ site.title }}</title> -->

    <!-- 页面描述 -->
    {% if page.excerpt %}
      {% assign description = page.excerpt | strip_html | strip_newlines %}
    {% else if page.description %}
      {% assign description = page.description | strip_html | strip_newlines %}
    {% else if content %}
      {% assign description = content | strip_html | strip_newlines | truncatewords: 100 %}
    {% else %}
      {% assign description = site.description %}
    {% endif %}
    <meta name="description" content="{{ title }}"/>
    <meta name="og:description" content="{{ title }}"/>

    <!-- 页面关键词：务必确保 site.keywords 值存在，以英文逗号分割 -->
    {% if page.keywords %} 
      {% assign keywords = page.keywords %}
    {% else %}
      {% assign keywords = site.keywords %}
    {% endif %}
    <meta name="keywords" content="{{ keywords | strip_html | strip_newlines }}"/>
    <meta name="og:keywords" content="{{ keywords | strip_html | strip_newlines }}"/>

    <!-- 站点名 -->
    <meta property="og:site_name" content="{{ site.title }}" />
    <!-- 页面类型 -->
    <meta property="og:type" content="article" />
    <!-- 页面所属地 -->
    <meta property="og:locale" content="zh_CN" />

    <!-- 页面图片链接 -->
    {% if page.og_image_url %}
      <meta property="og:image" content="{{ page.og_image_url }}" />
    {% else if page.photo_url %}
      <meta property="og:image" content="{{ page.photo_url }}" />
    {% endif %}

    <!-- 页面发布日期 -->
    {% if page.date %}
      <meta property="article:published_time" content="{{ page.date | date: '%Y-%m-%d' }}"/>
    {% endif %}

    <!-- 页面链接 -->
    <meta property="og:url" content="{{ page.url | remove_first: 'index.html' }}"/>

    {% if site.ios_app_name %}
      <meta name="apple-mobile-web-app-capable" content="yes" />
      <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    {% endif %}

    <!-- 网站信息 -->
    <link rel="shortcut icon" href="/favicon.jpg" />
    <!-- <link rel="canonical" href="{{ page.url | prepend: site.url }}" /> -->
    <link rel="alternate" type="application/atom+xml" href="/feed.xml" title="{{ site.title }}">
    <!-- 全站所需 css 文件 -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/Primer/2.7.0/css/primer.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/octicons/3.5.0/octicons.min.css">
    <link rel="stylesheet" href="/assets/css/components/collection.css"/>
    <link rel="stylesheet" href="/assets/css/components/boxed-group.css"/>
    <link rel="stylesheet" href="/assets/css/sections/repo-list.css"/>
    <link rel="stylesheet" href="/assets/css/sections/mini-repo-list.css"/>
    <link rel="stylesheet" href="/assets/css/globals/common.css"/>
    <link rel="stylesheet" href="/assets/css/globals/responsive.css"/>
    <link rel="stylesheet" href="/assets/css/posts/index.css"/>
    <link rel="stylesheet" href="/assets/vendor/primer-css/css/primer.css"/>
    <!-- 页面所需 css 文件 -->
    {% for css in page.css %}
      <link rel="stylesheet" href="/assets/css/{{ css }}" />
    {% endfor %}

    {% if page.mdi %}
      <link rel="stylesheet" href="//cdn.materialdesignicons.com/5.0.45/css/materialdesignicons.min.css">
    {% endif%}

    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.js"></script>
    <script src="/assets/js/main.js"></script>
    <!-- <script src="https://cdn.jsdelivr.net/npm/live2d-widget@3.0.4/lib/L2Dwidget.min.js"></script>
    <script type="text/javascript">
        L2Dwidget.init();
    </script> -->
  </head>
  <body class="{{ page.class }}" data-mz="{{ page.class }}">
    <header class="site-header">
      <div class="container">
        <h1>
          <a href="/" title="{{ site.title }}">
            <span class="octicon octicon-mark-github"></span>
            {{ site.title }}
          </a>
        </h1>
        <button class="collapsed mobile-visible" type="button" onclick="toggleMenu();">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <nav class="site-header-nav" role="navigation">
          {% for nav in site.navs %}
          <a
            href="{{ nav.href }}"
            class="{% if page.menu == nav.label %} selected {% endif %} site-header-nav-item"
            target="{{ nav.target | default: _self }}"
            title="{{ nav.label }}">
            {{ nav.label }}
          </a>
          {% endfor %}
        </nav>
      </div>
    </header>
  </body>
</html>
